package com.zm.zmgz.utils;

import com.zm.zmgz.pojo.UserBean;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

public class ControllerUtils { // 控制层工具类

    public static String getIdentificationNumber(String username, HttpServletRequest request) { // 传入用户名username
        ServletContext context = request.getServletContext();
        UserBean userBean = (UserBean)context.getAttribute(request.getSession().getId());
        return userBean.getIdentificationnumber();
    }


}
